<script setup>
import { ref } from 'vue'
import Header from '../../components/Header.vue';
import titles from '../../components/titles.vue'
import tabs from '../../components/tabs.vue'
// let showContent = ref(false)
// let showContentx = ref(false)
let a = ref(false)
let b = ref(false)
let c = ref(true)
let buttonColor = ref()
let index = ref(1)


const w1 = () => {
    a.value = true
    b.value = false
    c.value = false
    buttonColor.value = a.value ? 'btn_red' : ''
}

const w2 = () => {
    b.value = true
    a.value = false
    c.value = false
    buttonColor.value = b.value ? 'btn_red' : ''
}



</script>

<template>
    <Header></Header>
    <div class="content">
        <titles :title="'Apply Credentials'"></titles>
        <div class="box">
            <tabs :pass="index"></tabs>
            <div class="right-box">
                <div class="right-box-title">
                    <p class="title">Select the verification type</p>

                    <div class="right-box-input">
                        <div class="right-box-title-input" :class="a?'status_red':'status_grey'" @click="w1()">
                            <div class="right-box-title-input-left">
                                <img src="../../assets/img/xuewei.svg" alt="">
                                <p>University Certificates</p>
                            </div>
                            <div class="right-box-title-input-right">
                                <p>RM 100.00</p>
                            </div>
                        </div>
                        <img src="../../assets/img/redwancheng.svg" alt="" v-if="a">
                    </div>
                    <div class="right-box-title-p" v-if="a">
                        The following documents are required for the application:<br />
                        1 Original University Certificate scan copy<br />
                        2 Chinese ID scan copy
                    </div>

                    <div class="right-box-input">
                        <div class="right-box-title-input" :class="b?'status_red':'status_grey'" @click="w2()">
                            <div class="right-box-title-input-left">
                                <img src="../../assets/img/chengji.svg" alt="">
                                <p>Academic Transcripts</p>
                            </div>
                            <div class="right-box-title-input-right">
                                <p>RM 100.00</p>
                            </div>
                        </div>
                        <img src="../../assets/img/redwancheng.svg" alt="" v-if="b">
                    </div>
                    <div class="right-box-title-p" v-if="b">
                        The following documents are required for the application:<br />
                        1 Original University Certificate scan copy<br />
                        2 Chinese ID scan copy
                    </div>
                </div>
                <div class="right-box-bottom">
                    <button v-if="c" >Continue</button>
                    <button v-if="a" :class="buttonColor"><RouterLink to="/UniversityCertificates">Continue</RouterLink></button>
                    <button v-if="b" :class="buttonColor"><RouterLink to="/AcademicTranscripts">Continue</RouterLink></button>
                </div>
            </div>


        </div>
    </div>
</template>
<style scoped>
.content {
    width: 1100px;
    height: 100%;
    margin: auto;
    display: flex;
    flex-direction: column;
    margin-top: 100px;

    .title {
        display: flex;
        color: #1F2930;
        font-size: 20px;
        font-weight: 600;
        line-height: 30px;

        p {
            margin: 0 10px 20px 0;
        }

        .title-home {
            color: #0F094C;
        }
    }

    .box {
        display: flex;

        .left-box {
            display: flex;
            flex-direction: column;
            border: 1px solid #EFEFEF;
            width: 271px;
            height: 862px;
            margin: 0 20px 0 0;

            .left-box-active {
                p {
                    color: #EC535B;
                    font-weight: 700;
                    font-size: 18px;
                }

                background-color: #FFECEC;
            }

            p {
                margin: 20px 0 20px 10px;
                color: #1F2930;
                font-size: 18px;
                font-weight: 400;
            }
        }

        .right-box {
            border: 1px solid #EFEFEF;
            width: 900px;
            height: 862px;

            .right-box-title {
                margin: 20px;

                .right-box-title-p {
                    color: #646464;
                    line-height: 24px;
                    font-size: 16px;
                    font-weight: 400;
                }

                .right-box-input {
                    display: flex;
                    align-items: center;

                    .right-box-title-input {
                        display: flex;
                        justify-content: space-between;
                        align-items: center;
                        width: 456px;
                        height: 70px;
                        border-radius: 6px;
                        cursor: pointer;
                        margin: 30px 0 10px 0;

                        .right-box-title-input-left {
                            display: flex;
                            justify-content: center;
                            align-items: center;

                            img {
                                width: 44px;
                                height: 44px;
                                margin: 20px;
                            }
                        }

                        .right-box-title-input-right {
                            margin: 20px;
                        }

                    }

                    img {
                        margin: 20px 0 0 20px;
                    }
                }


            }

        }

        .right-box-bottom {
            display: flex;
            justify-content: end;

            button {
                position: absolute;
                top: 900px;
                left: 1200px;
                width: 149px;
                height: 44px;
                border: none;
                border-radius: 6px;
                cursor: pointer;
            }
        }
    }
}
</style>
